import constVal from '../../unit/const.js';
let {
	maxPoint
} = constVal;

let initState = 0;
if (initState < 0) {
	initState = 0;
} else if (initState > maxPoint) {
	initState = maxPoint;
}

export default {
	state: initState,
	max(state, payload) {
		state.max = payload > 999999 ? 999999 : payload; // 最大分数
	}
};